import request from '@/utils/request'

 //API常量
 const APIS = {
  V1: "/v1"
}

export function listOrg(params) {
  return request({
    url: APIS.V1+`/system/org/list`,
    method: 'get',
    params: params
  })
}
//查询所有击鼓
export function allOrg() {
  return request({
    url: APIS.V1+`/system/org/all`,
    method: 'get',
  })
}
export function listGroupCapital() {
  return request({
    url: APIS.V1+`/system/org/group/capital`,
    method: 'get',
  })
}

export function createOrUpdateOrg(data) {
  return request({
    url: APIS.V1+`/system/org/saveOrUpdate`,
    method: 'post',
    data
  })
}


export function deleteOrg(param) {
  return request({
    url: APIS.V1+`/system/org/deleteById`,
    method: 'delete',
    params: param
  })
}

// 流程配置列表
export function listProcess(params) {
  return request({
    url: APIS.V1+`/system/org/listProcess`,
    method: 'get',
    params: params
  })
}

export function saveOrUpdateProcess(params) {
  return request({
    url: APIS.V1+`/system/org/saveOrUpdateProcess`,
    method: 'post',
    data: params
  })
}
// 禁用
export function disableProcess(params) {
  return request({
    url: APIS.V1+`/system/org/disableProcess`,
    method: 'put',
    params: params
  })
}
// 启用
export function enableProcess(params) {
  return request({
    url: APIS.V1+`/system/org/enableProcess`,
    method: 'put',
    params: params
  })
}

